﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Models;
using DAL;

namespace BLL
{
    public class TemperatureHighBll
    {
        /// <summary>
        /// 根据id获取单条数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public TemperatureHighModel GetSingleDataById(string id)
        {
            return new TemperatureHighDal().GetSingleDataById(id);
        }

        /// <summary>
        /// 根据单位名，用户名获取体温异常的分页数据
        /// </summary>
        /// <param name="departId"></param>
        /// <param name="projectName"></param>
        /// <param name="userName"></param>
        /// <param name="pageSize"></param>
        /// <param name="pageIndex"></param>
        /// <param name="total"></param>
        /// <returns></returns>
        public List<TemperatureHighModel> GetDataListByDepartId(string departId, string projectName, string userName, int pageSize, int pageIndex, out int total,string beginTime,string endTime)
        {
            return new TemperatureHighDal().GetDataListByDepartId(departId, projectName, userName, pageSize, pageIndex, out total,beginTime,endTime);
        }

        /// <summary>
        /// 录入单挑数据
        /// </summary>
        /// <param name="thm"></param>
        /// <returns></returns>
        public bool InsertSingleData(TemperatureHighModel thm)
        {
            return new TemperatureHighDal().InsertSingleData(thm);
        }

        /// <summary>
        /// 修改单条数据
        /// </summary>
        /// <param name="thm"></param>
        /// <returns></returns>
        public bool UpdateSingleDataByTempId(TemperatureHighModel thm)
        {
            return new TemperatureHighDal().UpdateSingleDataByTempId(thm);
        }

        /// <summary>
        /// 根据departId获取隔离和异常数
        /// </summary>
        /// <param name="departId"></param>
        /// <returns></returns>
        public int[] GetTotalCountByDepartId(string departId)
        {
            return new TemperatureHighDal().GetTotalCountByDepartId(departId);
        }

        public List<TemperatureHighModel> GetDataList()
        {
            return new TemperatureHighDal().GetDataList();
        }

        }
}
